< previous page page_433 next page >

Page 433
12181-0433a.gif
Figure 15.8.
The MonthView control displayed at
runtime can be accessed with the mouse
or the keyboard.
Buttons at the top of the control are used to scroll the months in and out of view. The user can navigate using either the keyboard or the mouse. You can also see that the specified date is highlighted while the current date is circled. To see how this control works, start a new project in Visual Basic and add the MonthView control to the Toolbox. Now, add the MonthView control and two command buttons to the form as shown in Figure 15.9.
12181-0433b.gif
Figure 15.9.
Adding the MonthView control to a form.
Set the Name properties for the controls as shown in Table 15.10.
TABLE 15.10. SETTING THE PROPERTIES FOR THE MONTHVIEW DEMO.
ControlPropertyValue
MonthViewNamemvDate
Command1NamecmdShowDate
CaptionShow Date
Command2NamecmdQuit
CaptionQuit

In the mvDate_DateClick routine, add the following line of code:
MsgBox You have selected the date:  & DateClicked, vbInformation
When you run this application, the above code will display a message dialog telling you the date that you clicked the MonthView control. The controls Value property will be set

 
< previous page page_433 next page >

If you like this book, buy it!